//
//  AXMyScQtVC.m
//  AnXin100
//
//  Created by 天质弘耕 on 2018/10/18.
//  Copyright © 2018年 tzhg. All rights reserved.
//

#import "AXMyScQtVC.h"
#import "UIView+SDAutoLayout.h"
#import "ZXCategories.h"
#import "Header.h"
#import "UITableView+SDAutoTableViewCellHeight.h"
#import "AXMyScQtCollectionViewCell.h"




@interface AXMyScQtVC ()<UICollectionViewDelegateFlowLayout, UICollectionViewDataSource>


@property (nonatomic ,strong) UICollectionView *collectionView;



@end

@implementation AXMyScQtVC

- (void)viewDidLoad {
    //[self initData];
    [super viewDidLoad];
    [self creatView];
    
    //[self setupNavigationItems];
}

- (void)creatView {
    
    
    /** collectionView */
    
    UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc]init];
    flowLayout.itemSize = CGSizeMake((SCREEN_WIDTH-30)/2.0, (SCREEN_WIDTH-30)/2.0);
    /** 最小行间距 */
    flowLayout.minimumLineSpacing = 10;
    /** 最小列间距 */
    flowLayout.minimumInteritemSpacing = 0;
    self.collectionView = [[UICollectionView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, MyTableViewHeight) collectionViewLayout:flowLayout];
    //wangherun666
    self.collectionView.contentInset = UIEdgeInsetsMake(8, 8, 8, 8);
    self.collectionView.backgroundColor = [UIColor whiteColor];
    [self.collectionView registerClass:[AXMyScQtCollectionViewCell class] forCellWithReuseIdentifier:[AXMyScQtCollectionViewCell reuseID]];
    self.collectionView.delegate = self;
    self.collectionView.dataSource = self;
    [self.view addSubview:self.collectionView];
}



#pragma mark - Collection View Data Source
/** 定义展示的section的个数 */

- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
    
    return 1;
}
/** 定义展示的collectionCell的个数 */
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
    
    
    return 8;
}


- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    
    AXMyScQtCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:[AXMyScQtCollectionViewCell reuseID] forIndexPath:indexPath];
    
    
    
    return cell;
}

#pragma mark - collectionViewDelegateFlowLayout

/** UICollectionView被选中时的方法 */




#pragma mark - Setter & Getter

//- (NSMutableArray<ZXResourceModel *> *)modelsArray {
//    if (!_modelsArray) {
//        _modelsArray = [NSMutableArray<ZXResourceModel *> array];
//    }
//    return _modelsArray;
//}


@end
